import openai
from config import SECRET_KEY
import os
openai.api_key = SECRET_KEY

os.environ["http_proxy"] = "http://127.0.0.1:7890"
os.environ["https_proxy"] = "http://127.0.0.1:7890"

response = openai.Image.create(
    prompt="一只头白色，身体黑色的小猫",
    n=1,
    size="1024x1024"
)
image_url = response['data'][0]['url']
print(image_url)